<!doctype html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<script type="text/javascript" src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
	<script type="text/javascript">
		$(function  () {
			
			$('.list').hover(function(event) {
				width = $(this).width()+40;
				left = $(this).position().left;
				$('.box1').stop().animate({left: left,width: width},200);
			},function () {
				$('.box1').stop().animate({left: "0px",width: "20px"},500);
			});

			

		})


	</script>
	<style type="text/css">
		body{
			background: #01204F url() 0 0 no-repeat;
		}
		*{
			margin: 0px;
			padding: 0px;
			font-family: "微软雅黑";
		}
		.box{
			margin:100px 100px;
			background:  url() 0 0 no-repeat;
			position: relative;
			float: left;
		}
		.box .list{
			float: left;
			height: 50px;
			line-height: 50px;
			color: #fff;
			list-style: none;
			padding: 0px 20px;
			cursor: pointer;
		}
		.first{
			background: #CC0000 url() 0 0 no-repeat;
		}
		.box1{
			width: 50px;
			position: absolute;
			top: 0px;
			left: 0px;
			height: 50px;
			background: #CC0000 url() 0 0 no-repeat;
			z-index: -1;
		}

	</style>

</head>
<body>
	<ul class="box">
		<li class="list first">首页</li>
		<li class="list">新闻</li>
		<li class="list">社会新闻</li>
		<li class="list">技术</li>
		<li class="list">PHP技术</li>
		<li class="list">CSS</li>
		<li class="list">HTML</li>
		<li class="list">JAVASCRIPT</li>
		<p class="box1"></p>
	</ul>
</body>
</html>